package com.ossfk.jt808.constant;

import java.nio.charset.Charset;

public class Jt808Constants {
	public static final String STRING_ENCODING = "GBK";

	public static final Charset STRING_CHARSET = Charset.forName(STRING_ENCODING);
	/**
	 * 报文标识位
	 */
	public static final byte PKG_DELIMITER = 0x7e;

	/**
	 * 终端通用应答
	 */
	public static final int MSG_ID_TERMINAL_COMMON_RESP = 0x0001;
	/**
	 * 终端心跳
	 */
	public static final int MSG_ID_TERMINAL_HEART_BEAT = 0x0002;
	/**
	 * 终端注册
	 */
	public static final int MSG_ID_TERMINAL_REGISTER = 0x0100;
	/**
	 * 终端注销
	 */
	public static final int MSG_ID_TERMINAL_LOG_OUT = 0x0003;
	/**
	 * 终端鉴权
	 */
	public static final int MSG_ID_TERMINAL_AUTH = 0x0102;
	/**
	 * 位置信息汇报
	 */
	public static final int MSG_ID_TERMINAL_LOCATION_INFO_UPLOAD = 0x0200;
	/**
	 * 批量位置信息汇报
	 */
	public static final int MSG_ID_TERMINAL_LOCATION_BATCH_UPLOAD = 0x0704;
	/**
	 * 胎压数据透传
	 */
	public static final int MSG_ID_TERMINAL_TRANSMISSION_TYRE_PRESSURE = 0x0600;
	/**
	 * 查询终端参数应答
	 */
	public static final int MSG_ID_TERMINAL_PARAM_QUERY_RESP = 0x0104;

	/**
	 * 平台通用应答
	 */
	public static final int CMD_COMMON_RESP = 0x8001;
	/**
	 * 终端注册应答
	 */
	public static final int CMD_TERMINAL_REGISTER_RESP = 0x8100;
	/**
	 * 设置终端参数
	 */
	public static final int CMD_TERMINAL_PARAM_SETTINGS = 0X8103;
	/**
	 * 查询终端参数
	 */
	public static final int CMD_TERMINAL_PARAM_QUERY = 0x8104;

	public interface LocationConsts {
		/**
		 * 里程 1/10km
		 */
		public static final byte MILEAGE = 0x01;
		/**
		 * 油量 1/10L
		 */
		public static final byte OIL_MASS = 0x02;
		/**
		 * 行驶记录仪速度 1/10km/h
		 */
		public static final byte RECORD_SPEED = 0x03;
		/**
		 * 需要人工确认报警事件的ID
		 */
		public static final byte ALARM_ID = 0x04;
		/**
		 * 超速报警附加信息
		 */
		public static final byte OVERSPEED = 0x11;
		/**
		 * 进出区域/路线报警附加信
		 */
		public static final byte IN_OUT_AREAS_LINES = 0x12;
		/**
		 * 路段行驶时间不足/过长报警附加信息
		 */
		public static final byte DRIVE_TOO_SHORT_OR_LONG = 0x13;
		/**
		 * 扩展车辆信号状态位
		 */
		public static final byte SIGNAL_STATE = 0x25;
		/**
		 * IO状态位
		 */
		public static final byte IO_STATE = 0x2A;
		/**
		 * 模拟量
		 */
		public static final byte SIMULATION = 0x2B;
		/**
		 * 无线通信网络信号强度
		 */
		public static final byte WIRELESS_SIGNAL_STRENGTH = 0x30;
		/**
		 * GNSS 定位卫星数
		 */
		public static final byte GNSS_NUM_OF_SATELLITES = 0x31;
		/**
		 * 后续自定义信息长度
		 */
		public static final byte CUSTOM_INFO_LENGTH = (byte) 0xE0;
		/**
		 * 自定义传感器-油耗
		 */
		public static final byte CUSTOM_EB = (byte) 0x00EB;
		/**
		 * 自定义传感器-卸料
		 */
		public static final byte CUSTOM_EF = (byte) 0x00EF;
	}
}
